﻿<local:DocumentBase x:Class="WPFExcelReport.JLTFWB18"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
        Background="White" 
         Loaded="Window_Loaded" 
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}" Width="Auto">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="1*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>        
        <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Vertical">
            <WrapPanel Width="Auto">
                <Label Content="花型号："    Width="Auto" Margin="5,0,0,0"  HorizontalAlignment="Left"   FontSize="16" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtART" Width="80" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="WhiteSmoke" Panel.ZIndex="1"
                         Text="" KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="16" Foreground="#FF141111" Height="33" />
                <Label Content="检验员："    Width="Auto" Margin="5,0,0,0"  HorizontalAlignment="Left"   FontSize="16" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtSTAFF" Width="76" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="16" Foreground="#FF141111" Height="33" />
                <Label Content="检验日期从"  HorizontalAlignment="Left" Margin="5,0,0,0" Name="label3" VerticalAlignment="Center" Width="Auto" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,0,0,0" Name="FROM_DN_DATE" VerticalAlignment="Center" Panel.ZIndex="4"
                                    SelectedDateChanged ="FROM_DN_DATE_SelectedDateChanged" Width="133" />
                <Label Content="到" Height="Auto" HorizontalAlignment="Left" Margin="5,0,0,0" Name="label4" VerticalAlignment="Center" Width="19" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,0,0,0" Name="END_DN_DATE" VerticalAlignment="Center" Panel.ZIndex="5"
                                    SelectedDateChanged ="END_DN_DATE_SelectedDateChanged" Width="123" />
                <CheckBox IsChecked="False" Margin="5,0,0,0" Background="White" Name="Chk" Height="19" Width="80">英文数据</CheckBox>
                <CheckBox IsChecked="False" Margin="5,0,0,0" Background="White" Name="ChkART" Height="19" Width="80">合并信息</CheckBox>
                <Button Content="查询" Height="33" Margin="5,0,0,0"  Name="btnQuery" Width="50" Panel.ZIndex="6"
                        Click="btnQuery_Click"/>
                <Button Content="导出" Height="33" Margin="5,0,0,0"  Name="btnEXCEL" Width="50" Panel.ZIndex="7"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
        </StackPanel>
        <Grid Grid.Row="1" Grid.Column="0">           
                <DataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  FontSize="11"
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10"  IsReadOnly="True"
                               ItemsSource="{Binding}" x:Name="MasterDg" 
                               >
<!--ART	COLOR	WBBPACKNR	WIDTH	WBFKNEUDAT	WBFKWARSCH	WBFKWMPOS	MTR	YARD	TOTRATE	YRATE	
                    BEM	WBFFSCHL DES	RATE	TYPE	FDEFECT	EDEFECT WBBSTKNR,WBBMAART,WBBAUSFGRI -->
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=ART}" Header="花型号" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=COLOR}" Header="颜色" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=WBBLB}" Header="库区" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=WBBSTKNR}" Header="系统布卷号" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=WBBPACKNR}" Header="布卷号" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=WBFKWARSCH}" Header="检验人" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=WBFKWMPOS}" Header="验布机" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=MTR}" Header="米数" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=YARD}" Header="码数" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=TOTRATE}" Header="总分" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=WBFFSCHL}" Header="疵点" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=DES}" Header="描述" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=RATE}" Header="疵点评分" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=TYPE}" Header="疵点类型" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=FDEFECT}" Header="疵点开始" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=EDEFECT}" Header="疵点结束" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=WIDTH}" Header="幅宽" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=SKEW}" Header="纬斜" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=BOW}" Header="纬弧" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=AVGWIDTH}" Header="均幅" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=YRATE}" Header="分/百平方码" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=BEM}" Header="放码" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=WBFKNEUDAT}" Header="检验日期" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=JUDGE}" Header="判定" Width="SizeToCells" MinWidth="30" />
                    </DataGrid.Columns>
                </DataGrid  >
        </Grid>
    </Grid>
</local:DocumentBase>
